package com.ws.test;

import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;

public class T {
    public static List<String> listA = new ArrayList<String>();
    public static List<String> listB = new ArrayList<String>();
    public static List<String> listC = new ArrayList<String>();

    public static void a() {
        for (int i = 65; i < 91; i++) {
            listA.add(String.valueOf((char) i));
        }
    }

    public static void b() {
        Random random = new Random(100);
        DecimalFormat fnum = new DecimalFormat("##0.00");
        for (int i = 65; i < 91; i++) {
            listB.add(fnum.format(random.nextFloat() * 100));
        }
    }

    public static void c() {
        String s = "2013-05-";
        for (int i = 1; i < 30; i++) {
            if (i < 10) {
                listC.add(s + "0" + i);
            } else {
                listC.add(s + i);
            }
        }
    }

    public static List<String> d() {
        a();
        b();
        c();
        List<String> list = new ArrayList<String>();

        for (int i = 0; i < 22; i++) {
            if (i != 21) {
                list.add("{'date':'" + listC.get(i) + "','price':'"
                        + listB.get(i) + "','description':'" + listA.get(i)
                        + "'}");
            } else {
                list.add("{'date':'" + listC.get(i) + "','price':'"
                        + listB.get(i) + "','description':'" + listA.get(i)
                        + "'}");
            }
        }

        return list;
    }

    public static void main(String[] args) {
        a();
        b();
        c();

        for (int i = 0; i < 22; i++) {
            System.out
                    .println("{'date':'" + listC.get(i) + "','price':'"
                            + listB.get(i) + "','description':'" + listA.get(i)
                            + "'},");
        }
    }
}
